package com.mall.service.authority.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mall.model.domain.UmsMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface UmsMenuMapper extends BaseMapper<UmsMenu> {
    //查询所有菜单列表
    @Select("select * from ums_menu;")
    List<UmsMenu> getAll();

    //修改菜单显示状态
    @Update("update ums_menu set hidden = #{hidden} where id = #{id};")
    Integer updateHiddenById(Integer id, Integer hidden);
}

